package com.whf.converter;

import com.whf.dataobject.OrderMaster;
import com.whf.dto.OrderDTO;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/7/14 0014.
 */
public class OrderMaster2OrderDTO {

    public static OrderDTO convert(OrderMaster orderMaster){
        OrderDTO orderDTO=new OrderDTO();
        BeanUtils.copyProperties(orderMaster,orderDTO);
        return orderDTO;
    }
    public static List<OrderDTO> convert(List<OrderMaster> orderMasterList){
        List<OrderDTO> orderDTOList=new ArrayList<>();
        for(OrderMaster orderMaster:orderMasterList){
            OrderDTO orderDTO=new OrderDTO();
            BeanUtils.copyProperties(orderMaster,orderDTO);
            orderDTOList.add(orderDTO);
        }
        A: for(int i=0;i<10;i++){
            for(int j=1;j<10;j++){
                break A;

            }
        }





        return orderDTOList;

    }

}
